package wait和notify方法.消费者与生产者模式.Test01;

import java.util.ArrayList;
import java.util.List;

public class Test01 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList();
        Thread t1 = new Thread(new Producer(list));
        Thread t2 = new Thread(new Consumer(list));
        t1.setName("生产线程");
        t2.setName("消费线程");
        t1.start();
        t2.start();
    }
}
